package com.jiyun.admin.controller;


import com.domain.PlayersApplication;
import com.jiyun.admin.service.impl.PlayersApplicationServiceImpl;
import com.jiyun.admin.service.impl.UserServiceImpl;
import com.spyx.common.result.Result;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author li
 * @since 2024-12-20
 */
@RestController
@RequestMapping("/players-application")
public class PlayersApplicationController {


    private final PlayersApplicationServiceImpl playersApplicationService;

    public PlayersApplicationController(PlayersApplicationServiceImpl playersApplicationService){
        this.playersApplicationService = playersApplicationService;
    }

    @RequestMapping("list")
    public Result list() {
        return Result.ok(playersApplicationService.list(null));
    }


    @RequestMapping("update")
    public Result update(@RequestBody PlayersApplication playersApplication) {
        return playersApplicationService.updatelay(playersApplication);
    }

}
